package com.shine.app.ui;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;

import com.shine.app.AppManager;
import com.shine.app.BaseActivity;
import com.shine.app.R;
import com.shine.app.commons.UIHelper;
import com.shine.app.inject.InjectView;
import com.shine.app.inject.Injector;

public class SlideAboutActivity extends BaseActivity implements OnClickListener {
	@InjectView(R.id.head_back)
	private ImageView head_backImageView;
	@InjectView(R.id.head_seacher)
	private ImageView head_searchImageView;
	@InjectView(R.id.head_name)
	private TextView head_nameTextView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.slide_about);
		Injector.get(this).inject();
		head_backImageView.setOnClickListener(this);
		head_searchImageView.setOnClickListener(this);
		head_nameTextView.setText(R.string.set_about);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {

		case R.id.head_back:
			AppManager.getAppManager().finishActivity();
			overridePendingTransition(R.anim.anim, R.anim.slide_out_down);
			break;
		case R.id.head_seacher:
			UIHelper.showHome(this);
			overridePendingTransition(R.anim.anim, R.anim.slide_out_down);
			break;

		default:
			break;
		}
	}
}
